extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板
		li
			i.icon-angle-right
		li
			a(href="/withdraws") 退保证金


	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 退保证金

			div.box-content
				table(class="table table-striped table-bordered bootstrap-datatable")
					tbody
						tr
							td 时间
							td= moment(withdraw.updatedAt).format('LLL')
						tr
							td 单号
							td= withdraw.id
						tr
							td 金额
							td= withdraw.get('money')
						tr
							td 开户银行
							td= withdraw.get('bank')                            
						tr
							td 银行账号
							td= withdraw.get('channel_account') 
						tr
							td 开户名称
							td= withdraw.get('bank_account') 

				if withdraw.get('state') == 0
                    - var action = "/withdraws/approve/" + withdraw.id
                    form(class="form-horizontal", action="#{action}", method="post")
                        fieldset
                            div.form-actions
                                button(type="submit", class="btn btn-primary") 取现成功
                    - var action = "/withdraws/disapprove/" + withdraw.id
                    form(class="form-horizontal", action="#{action}", method="post")
                        fieldset
                            div.form-actions
                                button(type="submit", class="btn btn-primary") 取现失败